<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    new Promise((resolve, reject) => {
        resolve('reason');
    })
        .then(result => result, err => {
            console.log(err);
        })
        .then(data => console.log(data))
    // new Promise((resolve, reject) => reject('reason'))
    //     .catch(err => console.log(err))
    // .then(data => console.log(data))
</script>
</body>
</html>